package base.C00_Recursion;


import org.testng.annotations.Test;

public class Stairs {
    //只能走一步或者两步上台阶，总共有多少中走法
    public static int method(int quantity) {
        if(quantity==1)
            return 1;
        if(quantity==2)
            return 2;
        return method(quantity-2)+method(quantity-1);
    }

    @Test
    public void testMethod() {
        int method = method(3);
        System.out.println(method);
    }
}
